var WeiboScrapy = require('../src/WeiboScrapy');
var fs = require('fs');
var scrapy = WeiboScrapy({debug: true, logFile: 'test.log'});

scrapy.queryFeeds({}, function(docs){
    var doc = docs[0];
    var count = 0;
    for (key in doc) {
        fs.appendFile('feilds.php', 'public $' + key + ';\n', function(err){
            if (err) throw err;
        });
        count++;
    }
    console.log(count - 1);
}, 10);